import sys
import os
#  删除文件夹下的文件（图片）
dirname ="./left_image"
dellist = os.listdir(dirname)
for f in dellist:               
    file_path = os.path.join(dirname, f)
    if os.path.isfile(file_path):
        os.remove(file_path)
print("delete {} successfully".format(dirname))